package com.hukun.ssm1110.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

@Data

public class Article {
    private Integer id;
    private String title;
    private String content;
    //因为涉及到一对多的结果集封装所以要把评论的属性以集合的类型当作一的属性
    private List<Comment> commentList;

    public Article(Integer id, String title, String content) {
        this.id = id;
        this.title = title;
        this.content = content;
    }
}
